Except for trails which only locals can use safely,the only way in or out is via the main road through the pass.
From Peshawar to Torkham the border town you are required to obtain a permit and travel with an armed guard.
Taxis and buses are available on both sides of the border. See the Afghanistan and Pakistan pages for detailed info on crossing the pass.